package day04.homework.extend;

/**
 * 输出1900到2023年之间所有的闰年(每够10个年份，换一行)
 */
public class Three {
    public static void main(String[] args) {
        int count = 0;
        for (int year = 1900; year <= 2023; year++) {
            if ((year % 4 == 0 && year % 100 != 400) || year % 400 == 0) {
                System.out.print(year + " ");
                count++;
                if (count % 10 == 0) {
                    System.out.println();
                }
            }
        }
    }
}
